<template>
	<view class="my-search-container" :style="{'background-color': bgc}" @click="searchClickHandler">
		<view class="search-box" :style="{'border-radius': radius+'px'}">
		  <uni-icons type="search" size="17"></uni-icons>
		  <text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
    props:{
      bgc:{
        type:String,
        default: '#C00000'
      },
      radius:{
        type:Number,
        default:15
      }
    },
    methods:{
      searchClickHandler(){
        this.$emit('click')
      }
    }
	}
</script>

<style lang="scss">
.my-search-container{
  height: 50px;
  // background-color:#c00000;
  padding: 0 15px;
  display: flex;
  align-items: center;
  .search-box{
    height: 36px;
    background-color:#ffffff;
    // border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    .placeholder{
      font-size: 15px;
      margin-left: 10px;
    }
  }
}
</style>
